#ifndef FTPGET_H
#define FTPGET_H

#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <netdb.h>
#include <strings.h>
#include <string.h>
#include <errno.h>
#include <pwd.h>
#include <fcntl.h>

#define FTP_PORT	21
#define MAX_LENGTH 1024
#define MAX_PATH	40
#define MAX_AUTH	20

// Funcoes para controlo da aplicação
int createSocket(char *host, int port);
int receive(int sockfd);
int calcPort(char *str);
int receiveFile(int sockfd, char *fname);
char *getName(char *url);

//Funcao principal
void ftpget(char *host, char *url, char *login, char *pass);


#endif
